package com.hanter.android.radwidget.cupertino;

/**
 * 类名：TabBar <br/>
 * 描述：TabBar接口
 * 创建时间：2020/04/16 14:33
 *
 * @author panxi
 * @version 1.0
 */
public interface TabBar {

    /**
     * Sets the current tab.
     * <p>
     * This method is used to bring a tab to the front of the Widget,
     * and is used to post to the rest of the UI that a different tab
     * has been brought to the foreground.
     * <p>
     * Note, this is separate from the traditional "focus" that is
     * employed from the view logic.
     * <p>
     *
     * @param index the index of the tab that you want to indicate
     */
    void setCurrentTab(int index);

    /**
     * Returns the current tab.
     *
     * @return the current tab, may be {@code null} if no tab is set as current
     */
    int getCurrentTab();

    /**
     * Sets the current tab based on its tag.
     *
     * @param tag the tag for the tab to set as current
     */
    void setCurrentTabByTag(String tag);

    /**
     * Returns the tag for the current tab.
     *
     * @return the tag for the current tab, may be {@code null} if no tab is
     * set as current
     */
    String getCurrentTabTag();

}
